import Vue from "vue";
import Router from "vue-router";
Vue.use(Router);
import Layout from "@/views/layout/";
export default new Router({
  routes: [
    // {
    //   path: "/",
    //   redirect: '/adminGroup'
    // },
    {
      path: "/login",
      name: "login",
      component: () => import("@/views/login/")
    },
    {
      path: "/",
      name: "layout",
      component: Layout,
      redirect: "/authManage",
      // meta: { title: "authManage", alias: "系统管理" },
      children: [
        {
          path: "/authManage",
          name: "authManage",
          meta: { title: "系统管理", alias: "用户管理", name: "authManage" },
          component: () => import("@/views/authManage/authManage")
        },
        {
          path: "/roleManage",
          name: "roleManage",
          meta: { title: "系统管理", alias: "角色管理", name: "roleManage" },
          component: () => import("@/views/roleManage/roleManage")
        },
        {
          path: "/menuManage",
          name: "menuManage",
          meta: { title: "系统管理", alias: "首页导航", name: "menuManage" },
          component: () => import("@/views/menuManage/menuManage")
        },
        {
          path: "/groupManage",
          name: "groupManage",
          meta: { title: "系统管理", alias: "页脚导航", name: "groupManage" },
          component: () => import("@/views/groupManage/groupManage")
        },
        {
          path: "/lunbotu",
          name: "lunbotu",
          meta: { title: "系统管理", alias: "轮播图管理", name: "lunbotu" },
          component: () => import("@/views/lunbotu/lunbotu")
        },
        {
          path: "/styleShow",
          name: "styleShow",
          meta: { title: "系统管理", alias: "风采展示管理", name: "styleShow" },
          component: () => import("@/views/styleShow/styleShow")
        },
        // {
        //   path: "/regUser",
        //   name: "regUser",
        //   meta: { title: "会员管理", alias: "会员管理", name: "regUser" },
        //   component: () => import("@/views/regUser/regUser")
        // },
        {
          path: "/contentStyle",
          name: "contentStyle",
          meta: { title: "文档管理",  alias: "文章类别管理", name: "contentStyle" },
          component: () => import("@/views/contentStyle/contentStyle")
        },
        {
          path: "/content",
          name: "content",
          meta: { title: "文档管理", alias: "文章管理", name: "content" },
          component: () => import("@/views/content/content")
        },
        {
          path: "/addContent",
          name: "addContent",
          meta: { title: "文档管理", alias: "新增文章", name: "addContent" },
          component: () => import("@/views/content/addContent")
        },
      ]
    },
    {
      path: "/mngSite",
      name: "mngSite",
      component: () => import("@/views/home/mngSite")
    }
  ]
});
